from com.arcfox.school.processor.base_processor import BaseProcessor
from com.arcfox.middleware import async_mysql_middleware as db


class DieBianPheasantCollegeProcessor(BaseProcessor):
    def __init__(self):
        pass

    async def parse_and_save_data(self, result_json):
        data_list = result_json['data']['list']
        for data in data_list:
            university_name = data['name']
            mapping = db.MysqlMapping("tb_university_pheasant")
            await mapping.insert({"university_name": university_name})

